<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" import="myauctioneer.dto.User"
	import="myauctioneer.App"%>
<%@ include file="header.jsp"%>
<div id="content">
	<h1>Create article</h1>
	<p>
	<form action="<%=App.getBaseUrl()%>/article/createArticle"
		method="post">
		<table>
			<tr>
				<td><label for="brand">brand</label></td>
				<td><input type="text" name="brand" id="brand"
					value="<%=request.getParameter("brand") != null ? request
					.getParameter("brand") : ""%>" /></td>
			</tr>
			<tr>
				<td><label for="familyLine">family line</label></td>
				<td><input type="text" name="familyLine" id="familyLine"
					value="<%=request.getParameter("familyLine") != null ? request
					.getParameter("familyLine") : ""%>" /></td>
			</tr>
			<tr>
				<td><label for="model">model</label></td>
				<td><input type="text" name="model" id="model"
					value="<%=request.getParameter("model") != null ? request
					.getParameter("model") : ""%>" /></td>
			</tr>
			<tr>
				<td><label for="condition">condition</label></td>
				<td><select name="condition" size="1">
						<option value="all">all</option>
						<option value="new">new</option>
						<option value="used">used</option>
				</select></td>
			</tr>
			<tr>
				<td><label for="description">description</label></td>
				<td><textarea name="description" cols="40" rows="5"
						id="description"><%=request.getParameter("description") != null ? request
					.getParameter("description") : ""%></textarea></td>
			</tr>
			<tr>
				<td><label for="validUntil">valid until</label></td>
				<td><input type="text" name="validUntil" id="validUntil"
					value="<%=request.getParameter("validUntil") != null ? request
					.getParameter("validUntil") : ""%>" />
					<img src="<%=App.getBaseUrl()%>/skin/images2/cal.gif"
					onclick="javascript:NewCssCal ('validUntil','ddMMyyyy','dropdown',true,'24')"
					style="cursor: pointer" /></td>
			</tr>
			<tr>
				<td><label for="category">category</label></td>
				<td><select name="category" size="1">
						<option value="smartphone">smartphone</option>
						<option value="notebook">notebook</option>
						<option value="tablet">tablet</option>
				</select></td>
			</tr>
			<tr>
				<td><label for="price">price</label></td>
				<td><input type="text" name="price" id="price"
					value="<%=request.getParameter("price") != null ? request
					.getParameter("price") : ""%>" /></td>
			</tr>
			<tr>
				<td><label for="saleType">sale type</label></td>
				<td><select name="saleType" size="1">
						<option value="auction">auction</option>
						<option value="directSale">direct sale</option>
				</select></td>
			</tr>
			<tr>
				<td><input type="hidden" name="userId"
					value="<%=user.getUserId()%>"></td>
				<td><input type="submit" value="Create article" /></td>
			</tr>
		</table>
	</form>
	</p>
</div>
<%@ include file="footer.jsp"%>
